<?php
//链接数据库
$con = @mysqli_connect(
    "127.0.0.1",
    "root",
    "310831",
    "fatie"
);

if (!$con)
{
    die('Could not connect: ' . mysqli_error());
}else{
    echo "";

}

//echo "你好 ";
$sql = "delete from demo01 where ID = {$_POST['ID']}";
$res = mysqli_query($con,$sql);
if($res){
    echo "<script>alert('删除成功');document.location.href='01home.php'</script>";
}else{
    echo "<script>alert('删除失败');document.location.href='01home.php'</script>";
}

